package routers

import (
	"goblog/controllers"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/context"
)

func init() {
    //beego.Router("/", &controllers.MainController{})
	beego.Get("/",func(ctx *context.Context){
		ctx.Output.Body([]byte("hello world"))
	})

	beego.Get("/alice",func(ctx *context.Context){
		ctx.Output.Body([]byte("bob"))
	})

	beego.Any("/foo",func(ctx *context.Context){
		ctx.Output.Body([]byte("bar"))
	})

	beego.AutoRouter(&controllers.IndexController{})



}
